public List<List<Integer>> shiftGrid(int[][] grid, int k) {
        int m = grid.length;
        int n = grid[0].length;
        //把数放进顺序表中
        List<Integer> arrayList = new ArrayList<>();
        for (int i = 0; i < m; i++) {
            for (int j = 0; j < n; j++) {
                arrayList.add(grid[i][j]);
            }
        }
        //移动数据
        int index = 0;
        while (k != 0) {
            index = arrayList.size();
            int tmp = arrayList.remove(index-1);
            arrayList.add(0,tmp);
            k--;
        }
        index = 0;
        //嵌套
        List<List<Integer>> list = new ArrayList<>();
        for (int i = 0; i < m; i++) {
            ArrayList<Integer> arrayLists = new ArrayList<>();
            for (int j = 0; j < n; j++) {
                int tmp = arrayList.get(index);
                arrayLists.add(tmp);
                index++;
            }
            list.add(arrayLists);
        }
        return list;
    }